lib/pull: Add status for imported objects
authorColin Walters <walters@verbum.org>
Tue, 26 Sep 2017 17:58:54 +0000 (13:58 -0400)
committerAtomic Bot <atomic-devel@projectatomic.io>
Wed, 27 Sep 2017 15:35:11 +0000 (15:35 +0000)
commitc6f972406e1f3b939c11252d343bb3e91299f8b9
tree0e92f9c2c619d0bac88406608da3789304132455
parent2f9f7222a411906a2e508e6aecf5a7ae30a4638c
lib/pull: Add status for imported objects

Followup for recent work in commits:

 - 8a7a35970928331a028ccddd04590ac300dbd26e
 - 1a9a473580e9066f5d4a969932d703b5b104b2b7

Keep track of how many objects we imported, and print that for `ostree
pull-local` (also do this even if noninteractive, like we did for `pull`).

In implementing this at first I used separate variables for import
from repo vs import from localcache, but that broke some of the
tests that checked those values.

It's easier to just merge them; we know from looking at whether or not
`remote_repo_local` is set whether or not we were doing a "HTTP pull with
localcache" versus a true `pull-local` and can use that when rendering status.

Closes: #1219
Approved by: jlebon
src/libostree/ostree-repo-pull.c
src/ostree/ot-builtin-pull-local.c
tests/basic-test.sh
tests/pull-test.sh